package com.blueheart.music.mapper;

import com.blueheart.music.model.pojo.Song;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SongMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Song record);

    int insertSelective(Song record);

    Song selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Song record);

    int updateByPrimaryKeyWithBLOBs(Song record);

    int updateByPrimaryKey(Song record);
    /**
     * 通过歌手名模糊查询歌曲
     */
    List<Song> selectByName(String name);

    /**
     * 重名查询
     * @param name
     * @return
     */
    Song selectName(String name);
    /**
     * 查询整个对象
     */
    List<Song> selectAll();
    /**
     * 通过歌手id查询歌曲
     */
    List<Song> selectById(Integer id);
}